home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / dll_gen / vbdllcal / main.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-11-02  |  2.6 KB  |  92 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Concatonate Strings"
  5.    ClientHeight    =   2460
  6.    ClientLeft      =   876
  7.    ClientTop       =   1524
  8.    ClientWidth     =   6420
  9.    Height          =   2880
  10.    Left            =   828
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   2460
  13.    ScaleWidth      =   6420
  14.    Top             =   1152
  15.    Width           =   6516
  16.    Begin CommandButton Command1 
  17.       Caption         =   "&Make String"
  18.       Height          =   492
  19.       Left            =   2340
  20.       TabIndex        =   6
  21.       Top             =   1560
  22.       Width           =   1752
  23.    End
  24.    Begin TextBox Text3 
  25.       Height          =   288
  26.       Left            =   1740
  27.       TabIndex        =   5
  28.       Top             =   1080
  29.       Width           =   4572
  30.    End
  31.    Begin TextBox Text2 
  32.       Height          =   288
  33.       Left            =   1740
  34.       TabIndex        =   3
  35.       Text            =   " to work with computers"
  36.       Top             =   660
  37.       Width           =   3072
  38.    End
  39.    Begin TextBox Text1 
  40.       Height          =   288
  41.       Left            =   1740
  42.       TabIndex        =   1
  43.       Text            =   "I really like"
  44.       Top             =   240
  45.       Width           =   3072
  46.    End
  47.    Begin Label Label3 
  48.       BackColor       =   &H00C0C0C0&
  49.       Caption         =   "Final String"
  50.       Height          =   252
  51.       Left            =   180
  52.       TabIndex        =   4
  53.       Top             =   1080
  54.       Width           =   1392
  55.    End
  56.    Begin Label Label2 
  57.       BackColor       =   &H00C0C0C0&
  58.       Caption         =   "String &B"
  59.       Height          =   252
  60.       Left            =   180
  61.       TabIndex        =   2
  62.       Top             =   660
  63.       Width           =   1392
  64.    End
  65.    Begin Label Label1 
  66.       BackColor       =   &H00C0C0C0&
  67.       Caption         =   "String &A"
  68.       Height          =   252
  69.       Left            =   180
  70.       TabIndex        =   0
  71.       Top             =   240
  72.       Width           =   1392
  73.    End
  74. Option Explicit
  75. ' Take the two strings in the form and make a third
  76. Sub Command1_Click ()
  77. Dim NewString$
  78. Dim StringA$
  79. Dim StringB$
  80. Dim SpaceNeeded%
  81. ' Get the strings from the text controls
  82. StringA = Text1
  83. StringB = Text2
  84. ' Allocate space for new string
  85. SpaceNeeded = Len(StringA) + Len(StringB) + 1
  86. NewString = Space$(SpaceNeeded)
  87. ' Call the DLL function
  88. AddStrings StringA, StringB, NewString, SpaceNeeded
  89. ' Show the new string
  90. Text3 = NewString
  91. End Sub
  92.